<!--
 * @Date: 2021-03-01 21:21:23
 * @名称: 
 * @版本: 0.01
 * @作者: 初雪桜
 * @邮箱: 202184199@qq.com
 * @最后编辑: 初雪桜
 * @LastEditTime: 2021-03-11 21:00:09
 * @FilePath: /Site/app/useradmin/view/app/AppSetting.html
-->
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>网站后台管理模版</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/css/admin.css" />
    <script src="/public/static/admin/js/jquery.js"></script>
</head>

<body>
    <div class="layui-tab page-content-wrap">
        <ul class="layui-tab-title">
            <li id="tab-app-list" class="layui-this">App列表</li>
            <li id="tab-new-app">创建App</li>
        </ul>
        <div class="layui-tab-content">
            <!--App列表-->
            <div id="tab-body-app-list" class="layui-tab-item layui-show">

                <div class="main-layout-body">
                    <!--tab 切换-->
                    <div class="layui-tab layui-tab-brief main-layout-tab" lay-filter="tab" lay-allowClose="true">

                        <div class="layui-tab-content">
                            <iframe id="app-list" src="/{$useradmin}/App/AppSetting/AppList" width="100%" height="100%"
                                name="iframe" scrolling="auto" class="iframe" framborder="0"></iframe>

                        </div>
                    </div>
                </div>
            </div>
            <!--创建app-->
            <div id="tab-body-new-app" class="layui-tab-item">
                <div class="main-layout-body">
                    <!--tab 切换-->
                    <div class="layui-tab layui-tab-brief main-layout-tab" lay-filter="tab" lay-allowClose="true">

                        <div class="layui-tab-content">
                            <iframe src="/{$useradmin}/App/AppSetting/AddAppInfo" width="100%" height="100%"
                                name="iframe" scrolling="auto" class="iframe" framborder="0"></iframe>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
    <script>
        function appListAddOneData(e) {
            $("#app-list")[0].contentWindow.insertAppInfo(e);
            $("#tab-new-app").removeClass("layui-this");
            $("#tab-body-new-app").removeClass("layui-show");
            $("#tab-app-list").addClass("layui-this");
            $("#tab-body-app-list").addClass("layui-show");
        }
        //Demo
        layui.use(['form', 'element'], function () {
            var form = layui.form;
            var element = layui.element;
            form.render();
            //监听信息提交
            form.on('submit(siteInfo)', function (data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
            //监听seo提交
            form.on('submit(seoInfo)', function (data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
            //监听seo提交
            form.on('submit(emailInfo)', function (data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
            //监听评论提交
            form.on('submit(commentInfo)', function (data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
        });
    </script>
</body>

</html>